package com.shenfa.service.systemManager.organization.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.shenfa.bean.Organization;
import com.shenfa.bean.TreeNode;
import com.shenfa.dao.systemManager.organization.OrganizationDao;
import com.shenfa.service.systemManager.organization.OrganizationService;

public class OrganizationServiceImpl implements OrganizationService{

	@Autowired
	private OrganizationDao organizationDao;
	
	public List<Organization> getAll() {
		return organizationDao.getAll();
	}

	public List<Organization> getListByParent(String parentId,int start, int limit) {
		return organizationDao.getListByParent(parentId,start,limit);
	}

	public void add(Organization organization) {
		organizationDao.add(organization);
	}

	public void update(Organization organization) {
		organizationDao.update(organization);
	}

	public void delete(String id) {
		organizationDao.delete(id);
	}

	public Organization getById(String id) {
		return organizationDao.getById(id);
	}

	public List<TreeNode> getTree(String id) {
		return organizationDao.getTree(id);
	}
	
	public List<TreeNode> getTree_bydepNo(String depno) {
		return organizationDao.getTree_bydepNo(depno);
	}

	public int queryCount(String parentId) {
		// TODO Auto-generated method stub
		return organizationDao.queryCount(parentId);
	}
}
